Skip to content

Adjust fromChannel method to minimize injected headers and add examples#27

Merged
mkaufmann merged 2 commits intoforcedotcom:mainfrom
mkaufmann:mkaufmann-add-examples
Mar 12, 2025
Merged

Adjust fromChannel method to minimize injected headers and add examples#27
mkaufmann merged 2 commits intoforcedotcom:mainfrom
mkaufmann:mkaufmann-add-examples

Conversation

@mkaufmann
Copy link
Member

The intent of this change is to analyze how to use the JDBC driver in the least invasive way (compared to manual gRPC calling). To reach that minimum the DataCloudConnection.fromChannel method was adjusted to only add the must have interceptors, which - without usage of the corresponding connection parameters - are complete no ops.

To demonstrate this flow a new examples test package was create that demonstrates the approach and serves as documentation. To write that test case (and minimize the use of helpers which would hide complexity) the test hyper instance variable with its getPort method was exposed as public.

Drive-By:t

  • The hyper test instance was made non-static to avoid problems in parallel test execution.
  • A sample implementation of using the row based API to serve row based paginated results was also added and commented. With the parallel ongoing work we should see simplification of it.

…ples

The intent of this change was to analyze how to use the JDBC driver in a least invasive way (compared to manual gRPC calling).
To reach that minimum the `DataCloudConnection.fromChannel` method was adjusted to only add the must have interceptors, which - without usage of the corresponding connection parameters - are complete no ops.

To demonstrate this flow a new `examples` test package was create that demonstrates the approach and serves as documentation.
To write that test case (and minimize the use of helpers which would hide complexity) the test hyper instance variable with its getPort method was exposed as public.

Drive-By:t
- The hyper test instance was made non-static to avoid problems in parallel test execution.
- A sample implementation of using the row based API to serve row based paginated results was also added and commented. With the parallel ongoing work we should see simplification of it.
@mkaufmann mkaufmann force-pushed the mkaufmann-add-examples branch from d39b546 to 1555d4e Compare March 11, 2025 19:33
…ples

The intent of this change was to analyze how to use the JDBC driver in a least invasive way (compared to manual gRPC calling).
To reach that minimum the `DataCloudConnection.fromChannel` method was adjusted to only add the must have interceptors, which - without usage of the corresponding connection parameters - are complete no ops.

To demonstrate this flow a new `examples` test package was create that demonstrates the approach and serves as documentation.
To write that test case (and minimize the use of helpers which would hide complexity) the test hyper instance variable with its getPort method was exposed as public.

Drive-By:t
- The hyper test instance was made non-static to avoid problems in parallel test execution.
- A sample implementation of using the row based API to serve row based paginated results was also added and commented. With the parallel ongoing work we should see simplification of it.
@mkaufmann mkaufmann merged commit d908fdd into forcedotcom:main Mar 12, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants